import type { EditArticleRes, pbArticleParams, UpdateArticleParams } from "@/types/publish"
import { request } from "@/utils/request"

export const pbArticleAPI=(data:pbArticleParams)=>{
  return request('/v1_0/mp/articles','POST',data)
}
export const EditArticleAPI=(id:string)=>{
  return request<EditArticleRes>(`/v1_0/mp/articles/${id}`, 'GET')
}
export const UpdateArticleAPI=(id:string,data:UpdateArticleParams)=>{
  return request(`/v1_0/mp/articles/${id}`, 'PUT',data)
}